package com.feign.api.controller;

import com.feign.User;
import com.feign.feign.MemberServiceFeign;
import com.netflix.discovery.converters.Auto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderApiController implements IOrderService{
    @Autowired
    MemberServiceFeign memberServiceFeign;


    @Override
    @RequestMapping("/getOrder")
    public String getOrder(String name) {
        User user = memberServiceFeign.getMember(name);
        return user ==null?"没有找到任何用户":user.toString();
    }
}
